﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CreateCredentials.ascx.cs" Inherits="Admin_Asp_UserControls_CreateCredentials" EnableViewState="true" %>

<h2>No login credentials found</h2>

<p>
    Server has detected that you are missing the login file. So you will be asked to create the login credentials. Meaning your username and password so you can administer the modelviewer.
    If you ever forget your password you can delete the login.txt file. 
</p>

<label>Your username:</label><br />
<asp:TextBox ID="x_username" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="x_usernameValidator" runat="server" ControlToValidate="x_username" ErrorMessage="Need a username" EnableClientScript="false" CssClass="validationError" /><br />
<label>Your password:</label><br />
<label>At least 6 characters</label><br />
<asp:TextBox ID="x_password" runat="server" TextMode="Password"></asp:TextBox>
<asp:RegularExpressionValidator ID="x_passwordValidator" runat="server" ControlToValidate="x_password" ValidationExpression=".{6,}" ErrorMessage="Password has to be at least 6 letters" EnableClientScript="false" CssClass="validationError"/>
<asp:RequiredFieldValidator ID="x_passwordEmptyValidator" runat="server" ControlToValidate="x_password" ErrorMessage="Can't be empty" EnableClientScript="false" CssClass="validationError" /><br />
<label>Repeat password:</label><br />
<asp:TextBox ID="x_password_repeat" runat="server" TextMode="Password"></asp:TextBox>
<asp:CompareValidator runat="server" ID="x_password_repeatValidator" ControlToValidate="x_password_repeat" ControlToCompare="x_password" ErrorMessage="Passwords do not match"  EnableClientScript="false" CssClass="validationError"/>
<asp:RequiredFieldValidator ID="x_password_repeatEmptyValidator" runat="server" ControlToValidate="x_password_repeat" ErrorMessage="Can't be empty" EnableClientScript="false" CssClass="validationError" /><br /><br />

<asp:Panel ID="x_errorPanel" runat="server" Visible="false">
    <asp:Label runat="server" ID="x_errorLabel" CssClass="validationError"></asp:Label>
</asp:Panel>

<asp:Button ID="x_createcreds" runat="server" Text="Create Credentials" OnClick="CreateCredentials_Click" />


